﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<UI.Models.ListCategoryModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <table width="100%" cellspacing="0" cellpadding="0">
        <% for (int i = 0; i < Model.liCategoryProducts.Count; i++)
           { %>
        <tr>
            <td width="50%" align="left" valign="top">
                <table width="308" cellpadding="0" cellspacing="0" class="Table">
                    <tr>
                        <td valign="top">
                            <table width="100%" cellspacing="1" cellpadding="2">
                                <tr>
                                    <td align="center">
                                        <img src="<%= Url.Content(Model.liCategoryProducts[i].Image)%>" width="298" height="195" />
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top">
                                        <table width="100%" cellspacing="2" cellpadding="2">
                                            <tr>
                                                <td class="Text-organe-bold">
                                                    <%: Model.liCategoryProducts[i].Name%>
                                                    :
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="Text-blue-big">
                                                    <% foreach (var tmp in Model.liCategoryProducts[i].Products)
                                                       { %>
                                                    <img src="<%= Url.Content("~/Images/arrow-organe.gif")%>" />
                                                    <%: Html.ActionLink(tmp.Name ,"Detail", new { controller = "Product", Id = tmp.Id}, new {@class = "Text-blue-big"} )%>
                                                    <br />
                                                    <% } %>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div align="right">
                                                        <img src="<%= Url.Content("~/Images/arrow-organe.gif")%>" width="4" height="7" />
                                                        <%: Html.ActionLink("Xem thêm các tin khác", "ListProductByCategory", new { controller = "Product", ID = Model.liCategoryProducts[i].CategoryId }, new { @class = "Link-organe" })%>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
            <% i += 1;%>
            <%  if (i < Model.liCategoryProducts.Count)
                { %>
            <td width="50%" valign="top">
                <table width="308" cellpadding="0" cellspacing="0" class="Table">
                    <tr>
                        <td valign="top">
                            <table width="100%" cellspacing="1" cellpadding="2">
                                <tr>
                                    <td align="center">
                                        <img src="<%= Url.Content(Model.liCategoryProducts[i].Image)%>" width="298" height="195" />
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top">
                                        <table width="100%" cellspacing="2" cellpadding="2">
                                            <tr>
                                                <td class="Text-organe-bold">
                                                    <%: Model.liCategoryProducts[i].Name%>
                                                    :
                                                </td>
                                            </tr>
                                            <tr>
                                                <td class="Text-blue-big">
                                                    <% foreach (var tmp in Model.liCategoryProducts[i].Products)
                                                       { %>
                                                    <img src="<%= Url.Content("~/Images/arrow-organe.gif")%>" />
                                                    <%: Html.ActionLink(tmp.Name, "Detail", new { controller = "Product", ID = tmp.Id }, new { @class = "Text-blue-big" })%>
                                                    <a href="#" class="Text-blue-big">HCM: Saigon Pearl Ruby1, giá: 2.150 USD/m2</a><br />
                                                    <% } %>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <div align="right">
                                                        <img src="<%= Url.Content("~/Images/arrow-organe.gif")%>" width="4" height="7" />
                                                        <%: Html.ActionLink("Xem thêm các tin khác", "ListProductByCategory", new { controller = "Product", ID = Model.liCategoryProducts[i].CategoryId }, new { @class = "Link-organe" })%>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
            <% } %>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <% } %>
    </table>
</asp:Content>